﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace win1
{
    public partial class add : Form
    {
        public add()
        {
            InitializeComponent();
        }

        private void add_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            String sql = "insert into [user] values('" + textBox1.Text + "','" + textBox2.Text + "')";
            int row = DataBase.ExecuteU(sql);
            if (row > 0)
            {
                MessageBox.Show("录入成功！", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Close();
            }
            else
            {
                MessageBox.Show("录入失败：","操作提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
            }
        }
    }
}
